<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="http://at.alicdn.com/t/c/font_4096975_pswyqyk8tdo.css">
    <title>Document</title>
    <style>
         /* 1.去除默认样式 设置底色 */
         *{
            margin: 0;
            padding: 0;
            background-color: #000;
        }
        /* 2.准备导航的基本样式 */
        ul{
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%,-50%);
            display: flex;
            list-style: none;
        }
        /* 3.1 准备导航里面图标的基本样式 */
        ul li {
            position: relative;
            margin: 0 10px;
            width: 40px;
            height: 40px;
        }
        /* 3.2定位重合 */
        ul li span{
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            line-height: 40px;
            font-size: 40px !important;
            /* background: #fff;      */
            color: #222;
            text-align: center;
            transition: all 0.5s ease-in-out;
            cursor: pointer;
        }
        /* 表层的盒子*/
        ul li span:first-child {
            height: 0;
            z-index: 2;
        }
        ul li:nth-child(1) span:first-child{
            border-bottom: 1px solid #1da1f2;
        }
        ul li:nth-child(2) span:first-child{
            border-bottom: 1px solid #25d366;
        }
        ul li:nth-child(3) span:first-child{
            border-bottom: 1px solid #f00;
        }  
        ul li:nth-child(3) span{
            font-size: 32px !important;
        }
        ul li:nth-child(1):hover span:first-child{
            color:#1da1f2 ;
            height: 100%;
        }   
        ul li:nth-child(2):hover span:first-child{
            color:#25d366 ;
            height: 100%;
        }
        ul li:nth-child(3):hover span:first-child{
            color:#f00 ;
            height: 100%;
        }

    </style>
</head>
<body>
    <ul>
        <li>
            <span class="iconfont icon-QQ"></span>
            <span class="iconfont icon-QQ"></span>
        </li>
        <li>
            <span class="iconfont icon-weixin"></span>
            <span class="iconfont icon-weixin"></span>
        </li>
        <li>
            <span class="iconfont icon-douyin"></span>
            <span class="iconfont icon-douyin"></span>
        </li>
    </ul>
</body>
</html>